package org.crystal.tradecraft.model.binance.market.filter;

import lombok.Data;
import lombok.EqualsAndHashCode;
import org.crystal.tradecraft.model.binance.enumeration.FilterType;

/**
 * <h3>MARKET_LOT_SIZE 市价订单尺寸</h3>
 * MARKET_LOT_SIZE过滤器为交易对上的MARKET订单定义了数量(即拍卖中的"手数")规则。 共有3部分：<p>
 * <ul>
 *     <li>minQty定义了允许的最小quantity。</li>
 *     <li>maxQty定义了允许的最大数量。</li>
 *     <li>stepSize定义了可以增加/减少数量的间隔。</li>
 * </ul>
 * 为了通过 market lot size，quantity 必须满足以下条件：<p>
 * <ul>
 *     <li>quantity >= minQty</li>
 *     <li>quantity <= maxQty</li>
 *     <li>quantity % stepSize == 0</li>
 * </ul>
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class MarketLotSize extends BinanceFilter {

    public MarketLotSize() {
        super(FilterType.MARKET_LOT_SIZE);
    }

    private double minQty;

    private double maxQty;

    private double stepSize;
}
